<style type="text/css">
    .layui-table td, .layui-table th {
        padding: 8px;
        font-size: 12px;
    }
</style>
<div class="layui-side layui-bg-black">
    <div class="layui-side-scroll">
        <div class="logo">小程序后台</div>
        <ul class="layui-nav layui-nav-tree" lay-filter="menu">
            <foreach name="menu_list" item='val'>
                <li class="layui-nav-item<if condition='$val["cn"] eq $controller_name'> layui-nav-itemed</if>" >
                <a href="{#$val.link#}">{#$val.name#}</a>
                <if condition="!empty($val['child'])">
                    <dl class="layui-nav-child">
                        <foreach name="val.child" item="v">
                            <php>$is_newopen = !empty($v['is_newopen']) ? 1 : 0;</php>
                            <dd  <if condition="$val['cn'] eq $controller_name and $v['an'] eq $action_name">class="layui-this"</if> ><a href="{#$v.link#}" <if condition="$is_newopen eq 1">target="_blank"</if> >{#$v.name#}</a></dd>
                        </foreach>
                    </dl>
                </if>
                </li>
            </foreach>
        </ul>
    </div>
</div>

<div class="layui-body">
    <h1 class="site_h1">
        <div class="fl">{#$nowposition|default=''#}</div>
        <div class="fr mr50 f12">{#$admin_name|default=''#}&nbsp;&nbsp;<a style="color:#1E9FFF;" href="{#:url('admin/index/logout')#}">退出</a>
        </div>
    </h1>
    <script>
        layui.use('element', function () {
            var element = layui.element;
            element.on('nav(demo)');
        });
    </script>